﻿using System;

namespace AutoplanetaTaskManager.Utilities
{
    public class Converter
    {
        public static DateTime DateTimeToYMDH(DateTime dateTime, string hh_mm)
        {
            return DateTime.Parse(string.Format("{0}.{1}.{2} " + hh_mm, dateTime.Day, dateTime.Month, dateTime.Year));
        }

        public static DateTime DateTimeToYMDH(DateTime dateTime, double hour)
        {
            return new DateTime(dateTime.Year, dateTime.Month, dateTime.Day, 0, 0, 0).AddHours(hour);
        }

        public static DateTime GetTimeAfterHours(DateTime dateTime, double countHour)
        {
            return dateTime.AddHours(countHour);
        }
    }
}
